/**
 * Created by 45865 on 2020/5/31.
 */

function okay() {
    // $('input[name="loginName"]').val("tom")
    // var loginName = $('input[name="loginName"]').val()
    var city = $("#s_city").val()
    var county = $("#s_county").val()
    var name = $('input[name="name1"]').val()
    var phone = $('input[name="phone1"]').val()
    var address = $('input[name="address"]').val()
    var addressInfo = {
        //loginName:loginName,
        receiveName:name,
        receivePhone:phone,
        city:city,
        district:county,
        address:address
    }
    console.log(addressInfo)
    $.ajax({
        url:"/address/add",
        contentType: "application/json",
        data:JSON.stringify(addressInfo),
        type:"post",
        success:function (data) {
            console.log(addressInfo)
            if (data == "success"){
                alert("添加成功")
            }
        }
    })
}
